import Vue from "vue";
import "reset-css";
import "lib-flexible";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import "@/utils/vant-ui";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";

// 引入全局图标
import './static/fonts/iconfont.css'

Vue.use(ElementUI);
Vue.config.productionTip = false;

// 全局前置守卫
router.beforeEach((to, from, next) => {
  // 设置页面标题
  if (to.meta.title) {
    document.title = to.meta.title;
  }
  console.log("当前页面路由：", to.path);
  next();
});

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");
